/********************************************************************

Define pointer exceptions.

Write Date: 2011/07/16
Author: Deng Nianchen
>>>> The file contains following classes: 
>>>> PtrException
>>>> --> NullPtrException
	
*********************************************************************/
#ifndef PTR_EXCEPTIONS_HPP
#define PTR_EXCEPTIONS_HPP
#include "OOPException.hpp"

_OOPUTILS_BEGIN



/**************************************************************************************************
 * <summary>  Exception for signalling general pointer errors.  </summary>
 *
 * <remarks>  Deng Nianchen, 2011/3/24. </remarks>
 **************************************************************************************************/

class PtrException: public OOPException
{

public:


    virtual OOPString getReson () const throw ()
    {
        return L"Unknown Ptr exception.";
    }


};



/**************************************************************************************************
 * <summary>  Exception for signalling null pointer errors.  </summary>
 *
 * <remarks>  Deng Nianchen, 2011/3/24. </remarks>
 **************************************************************************************************/

class NullPtrException : public PtrException
{

public:

    virtual OOPString getReson () const throw ()
    {
        return L"The Ptr points to null.";
    }

};



_OOPUTILS_END




#endif